using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace GameForKids
{

    class Animations
    {
        public Texture2D Texture
        {
            get { return texture; }
        }
        Texture2D texture;

        // moi thoi diem ve mot frame
        public float FrameTime
        {
            get { return frameTime; }
        }
        float frameTime;

        //cho phep animation lien tuc
        public bool IsLooping
        {
            get { return isLooping; }
        }
        bool isLooping;

        //dem so frame cua doi tuong
        public int FrameCount
        {
            get { return Texture.Width / FrameWidth; }
        }

        //doi tuong co chieu cao = chieu ngang
        // tra ve kich thuoc moi frame
        public int FrameWidth
        {
            get { return 55;}
        }

        public int FrameHeight
        {
            get { return Texture.Height; }
        }

        // khoi tao animation     
        public Animations(Texture2D texture, float frameTime, bool isLooping)
        {
            this.texture = texture;
            this.frameTime = frameTime;
            this.isLooping = isLooping;
        }
    }
}
